package com.vv.guavademo.util;

import com.google.common.base.Preconditions;

/**
 * @author kw
 * @program guava-demo
 * @description
 * @create 2024 - 11 - 04 19:25
 **/
public class PreconditionsUtil {

    /**
     * 验证参数是否为true
     *
     * @param expression
     * @param message
     */
    public static void checkArgument(boolean expression, String message) {
        Preconditions.checkArgument(expression, message);
    }

    /**
     * 检查状态是否为true
     *
     * @param expression
     * @param message
     */
    public static void checkState(boolean expression, String message) {
        Preconditions.checkState(expression, message);
    }
}
